package com.woniu.search.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 杨光 微信号:tolryg
 * @time 12:00
 */
@Document(indexName = "movie",type = "movie")
public class MovieSearch {

    private static final long serialVersionUID = 1L;

    @Field( type = FieldType.Text,index = true)
    private String searchText;
    /** 主键 */
    @Id
    @Field(name = "id", type = FieldType.Integer)
    private Integer movieId;

    /** 影片名称 */
    @Field( type = FieldType.Keyword,index = false)
    private String movieName;

    /** 上映时间 */
    @Field( type = FieldType.Keyword,index = false)
    private String movieReleaseTime;

    /** 影片描述 */
    @Field( type = FieldType.Keyword,index = false)
    private String movieInfo;

    /** 电影版本 */
    @Field( type = FieldType.Keyword,index = false)
    private String movieVersion;

    /** 影片海报 */
    @Field( type = FieldType.Keyword,index = false)
    private String movieImg;

    /** 影片英文名 */
    @Field( type = FieldType.Keyword,index = false)
    private String movieEname;

    /** 评分 */
    @Field( type = FieldType.Double,index = false)
    private BigDecimal movieScore;

    /** 影片状态0-未上线 1-上线 2-下线 */
    @Field( type = FieldType.Integer,index = false)
    private Integer movieStatus;

    /** 观看次数 */
    @Field( type = FieldType.Integer,index = false)
    private Integer movieCount;

    /** 票房金额 */
    @Field( type = FieldType.Long,index = false)
    private Long movieBoxOffice;

    /** 影片时长（分钟） */
    @Field( type = FieldType.Integer,index = false)
    private Integer movieTime;

    /** 想要观看人数 */
    @Field( type = FieldType.Long,index = false)
    private Long movieWantCount;

    /** 影片上映年份 */
    @Field( type = FieldType.Integer,index = false)
    private Integer movieReleaseYear;

    /** 累计评论人数 */
    @Field( type = FieldType.Long,index = false)
    private Long commentUserCount;

    @Field( type = FieldType.Keyword,index = false)
    private String movieTypeStr;

    public String getSearchText() {
        return searchText;
    }

    public void setSearchText(String searchText) {
        this.searchText = searchText;
    }

    public Integer getMovieId() {
        return movieId;
    }

    public void setMovieId(Integer movieId) {
        this.movieId = movieId;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public String getMovieReleaseTime() {
        return movieReleaseTime;
    }

    public void setMovieReleaseTime(String movieReleaseTime) {
        this.movieReleaseTime = movieReleaseTime;
    }

    public String getMovieInfo() {
        return movieInfo;
    }

    public void setMovieInfo(String movieInfo) {
        this.movieInfo = movieInfo;
    }

    public String getMovieVersion() {
        return movieVersion;
    }

    public void setMovieVersion(String movieVersion) {
        this.movieVersion = movieVersion;
    }

    public String getMovieImg() {
        return movieImg;
    }

    public void setMovieImg(String movieImg) {
        this.movieImg = movieImg;
    }

    public String getMovieEname() {
        return movieEname;
    }

    public void setMovieEname(String movieEname) {
        this.movieEname = movieEname;
    }

    public BigDecimal getMovieScore() {
        return movieScore;
    }

    public void setMovieScore(BigDecimal movieScore) {
        this.movieScore = movieScore;
    }

    public Integer getMovieStatus() {
        return movieStatus;
    }

    public void setMovieStatus(Integer movieStatus) {
        this.movieStatus = movieStatus;
    }

    public Integer getMovieCount() {
        return movieCount;
    }

    public void setMovieCount(Integer movieCount) {
        this.movieCount = movieCount;
    }

    public Long getMovieBoxOffice() {
        return movieBoxOffice;
    }

    public void setMovieBoxOffice(Long movieBoxOffice) {
        this.movieBoxOffice = movieBoxOffice;
    }

    public Integer getMovieTime() {
        return movieTime;
    }

    public void setMovieTime(Integer movieTime) {
        this.movieTime = movieTime;
    }

    public Long getMovieWantCount() {
        return movieWantCount;
    }

    public void setMovieWantCount(Long movieWantCount) {
        this.movieWantCount = movieWantCount;
    }

    public Integer getMovieReleaseYear() {
        return movieReleaseYear;
    }

    public void setMovieReleaseYear(Integer movieReleaseYear) {
        this.movieReleaseYear = movieReleaseYear;
    }

    public Long getCommentUserCount() {
        return commentUserCount;
    }

    public void setCommentUserCount(Long commentUserCount) {
        this.commentUserCount = commentUserCount;
    }

    public String getMovieTypeStr() {
        return movieTypeStr;
    }

    public void setMovieTypeStr(String movieTypeStr) {
        this.movieTypeStr = movieTypeStr;
    }


    @Override
    public String toString() {
        return "MovieSearch{" +
                "searchText='" + searchText + '\'' +
                ", movieId=" + movieId +
                ", movieName='" + movieName + '\'' +
                ", movieReleaseTime='" + movieReleaseTime + '\'' +
                ", movieInfo='" + movieInfo + '\'' +
                ", movieVersion='" + movieVersion + '\'' +
                ", movieImg='" + movieImg + '\'' +
                ", movieEname='" + movieEname + '\'' +
                ", movieScore=" + movieScore +
                ", movieStatus=" + movieStatus +
                ", movieCount=" + movieCount +
                ", movieBoxOffice=" + movieBoxOffice +
                ", movieTime=" + movieTime +
                ", movieWantCount=" + movieWantCount +
                ", movieReleaseYear=" + movieReleaseYear +
                ", commentUserCount=" + commentUserCount +
                ", movieTypeStr='" + movieTypeStr + '\'' +
                '}';
    }
}
